import request from '@/utils/request.js'
import { userInfoByArguments } from '@/utils/userHandler.js'
/* 采购分析 start */
// 物料采购数据和合同数量接口
export function source_purchaseData() {
  return request({
    url: '/api/Source/purchaseData',
    methods:'get'
  })
}

export function source_purchasing(startTime, endTime) {
  const data = {
    startTime,
    endTime
  };
  return request({
    url: '/api/Source/purchasing',
    methods:'get',
    params: data
  })
}
/* 采购分析 end */

/* 寻源分析 start */
export function source_money_ratio_APP(startTime, endTime) {
  let comID = userInfoByArguments('company_id');
  const data = {
    startTime,
    endTime,
    comID
  };
  return request({
    url: '/api/Source/money_ratio_APP',
    methods: 'get',
    params: data
  })
}
/* 寻源分析 end */


/* 出入库分析 start */

// 出库接口
export function source_getstoreroomListouth5(data = {...data}) {
  data.comID = userInfoByArguments('company_id');
  return request({
    url: '/api/Source/getstoreroomListouth5',
    methods:'get',
    params: data
  });
}

// 入库接口
export function source_getstoreroomListinh5(data = {...data}) {
  data.comID = userInfoByArguments('company_id');
  return request({
    url: '/api/Source/getstoreroomListinh5',
    methods: 'get',
    params: data
  })
}

// 接口名称: 统计分析 - 出入库分析 - 仓库列表信息
// 请求方法: GET
// 接口地址: /api/Source/getCompanywarehouseinfo
export function source_getCompanywarehouseinfo(comID) {
  const data = {
    comID
  };
  return request({
    url: '/api/Source/getCompanywarehouseinfo',
    methods: 'get',
    params: data
  })
}


/* 出入库分析 end */
